package ml;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;


public abstract class MLFileFormat {

	protected BufferedWriter bw;
	protected DataModel dm;

	public MLFileFormat(String trainingFile, DataModel dm) throws IOException {
		this.dm = dm;
		bw = new BufferedWriter(new FileWriter(new File(trainingFile)));
	}

	public abstract void writeData() throws IOException;

	public abstract void writeFeatures() throws IOException;

	public void close() throws IOException {
		bw.flush();
		bw.close();
	}
}
